package com.rybbaby.tss.tasks.core.task.service.imp;

import com.rybbaby.tss.tasks.core.bean.PageBean;
import com.rybbaby.tss.tasks.core.task.dao.ITssMemberAttendClassRecordDao;
import com.rybbaby.tss.tasks.core.task.entity.TssMemberAttendClassRecord;
import com.rybbaby.tss.tasks.core.task.service.ITssMemberAttendClassRecordService;
import com.rybbaby.tss.tasks.core.web.service.imp.BaseServiceImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @description 会员报班记录表数据库操作服务实现
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-24 下午2:43:28
 */
@Service
@Transactional
public class TssMemberAttendClassRecordServiceImp extends BaseServiceImp<TssMemberAttendClassRecord> implements ITssMemberAttendClassRecordService {

    @Autowired
    private ITssMemberAttendClassRecordDao dao;

    /**
     * 根据会员课时包和班级id查询已报班信息
     *
     * @param memberPackageId
     * @param classId
     * @return
     */
    @Override
    public List<Map<String, Object>> classDateList(String memberPackageId, String classId) {
        return dao.classDateList(memberPackageId,classId);
    }

    /**
     * 根据会员课时包id分组查询会员报班记录
     *
     * @param memberPackageId
     * @return
     */
    @Override
    public PageBean tssMemberAttendClassRecordListGroupByClass(String memberPackageId, Integer pageNo, Integer pageSize) {
        return dao.tssMemberAttendClassRecordListGroupByClass(memberPackageId,pageNo,pageNo);
    }
}
